<template>
	<view class="">
		<view class="style-three dir-left-wrap padding">
			<view class="item" v-for="(item, index) in list" :key="index" @click="jump(item.url)">
				<image class="pic_url" :src="item.icon_url" />
				<text class="name t-omit">{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.allReq(2)
		},
		methods: {
			jump(item) {
				uni.navigateTo({
					url: item
				})
			},
			allReq(pid) {
				this.$request({
					url: this.$api.navs.list,
					data: {
						pid: pid,
						status: 1,
						limit: 200
					}
				}).then((res) => {
					if (res.code == 0) {
						if (pid == 2) {
							this.list = res.data.list
						}
					}
				}).catch(() => {

				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.style-three {
		width: #{750upx};
	}

	.padding {
		padding: 0 #{27rpx};
	}

	.item {
		width: #{120rpx};
		margin: #{64rpx} #{27rpx} 0 #{27rpx};
	}

	.pic_url {
		width: #{120rpx};
		height: #{120rpx};
		margin-bottom: #{20rpx};
	}

	.name {
		color: #353535;
		font-size: #{26rpx};
		width: 100%;
		text-align: center;
	}
</style>
